package com.speech.net.constant;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * Created by XuLH on 2018/6/21.
 */
public enum EnumRegisterType
{
	//无
	UNKNOWN(0),

	手机号(1),

	微信(2),

	QQ(3),

	微博(4),
	;

	private final int value;
	EnumRegisterType(int v) {value=v;}
	@JsonValue
	public int value() {return value;}
	@JsonCreator
	public static EnumRegisterType fromValue(Integer val) {
		if(val==null) return null;
		for (EnumRegisterType c: EnumRegisterType.values()){
			if (c.value==val) {return c;}
		}
		return UNKNOWN;
	}
}
